﻿using Jquery.Validate.Additional;
using NUnit.Framework;

namespace UntiTest
{
    public class TestIdCard
    {
        public string[] Date =
            {
                "110101200205167896",
                "110101200205162171",
                "110101200205166236",
                "110101200205162796",
                "110101200205168039",
                "11010120020516859X",
                "110101200205164679",
                "110101200205166893",
                "110101200205162630",
                "110101200205168119",
                "11010120020516365X",
                "110101200205168258",
                "11010120020516533X",
                "11010120020516701X",
                "110101200205164134",
                "110101200205168119",
                "110101200205165954",
                "110101200205162614",
                "110101200205167730",
                "110101200205161056",
                "110101200205167052",
                "110101200205163975",
                "110101200205166156",
                "110101200205167175",
                "110101200205162278",
                "110101200205168717",
                "110101200205162155",
                "110101200205169955",
                "110101200205162737",
                "110101200205165751",
                "110101200205166551",
                "110101200205168231",
                "110101200205166711",
                "110101200205164652",
                "11010120020516349X",
                "110101200205164572",
                "110101200205167837",
                "110101200205166834",
                "110101200205165356",
                "110101200205164556",
                "110101200205167351",
                "11010120020516103X",
                "110101200205161355",
                "110101200205164396",
                "110101200205161830",
                "110101200205161152",
                "110101200205164353",
                "110101200205165719",
                "110101200205166631",
                "110101200205162075",
                "110101200205166578",
                "110101200205167159",
                "110101200205169197",
                "110101200205161996",
                "110101200205162876",
                "110101200205164919",
                "110101200205166033",
                "110101200205169058",
                "110101200205161515",
                "110101200205169293",
                "110101200205167458",
                "110101200205164716",
                "11010120020516517X",
                "110101200205166850",
                "110101200205162577",
                "11010120020516541X",
                "110101200205162550",
                "110101200205161697",
                "11010120020516453X",
                "11010120020516955X",
                "110101200205161275",
                "110101200205169111",
                "110101200205167255",
                "110101200205164193",
                "110101200205163692",
                "110101200205167036",
                "110101200205163633",
                "110101200205162753",
                "110101200205166359",
                "110101200205162112",
                "110101200205165356",
                "110101200205166439",
                "110101200205164337",
                "110101200205161654",
                "110101200205169170",
                "110101200205169373",
                "110101200205169015",
                "110101200205165735",
                "110101200205162796",
                "110101200205168573",
                "110101200205168557",
                "110101200205168776",
                "110101200205166316",
                "11010120020516605X",
                "110101200205167095",
                "11010120020516365X",
                "110101200205165858",
                "110101200205164492",
                "110101200205162817",
                "110101200205166412",
                "110101200205168610",
                "110101200205163676",
                "110101200205162171",
                "110101200205167079",
                "110101200205161793",
                "110101200205167474",
                "110101200205169891",
                "110101200205166017",
                "110101200205168290",
                "110101200205165831",
                "110101200205162294",
                "110101200205164273",
                "110101200205163713",
                "11010120020516939X",
                "110101200205164935",
                "110101200205162032",
                "110101200205161371",
                "11010120020516453X",
                "110101200205167677",
                "110101200205163190",
                "110101200205166375",
                "110101200205166797",
                "110101200205168899",
                "110101200205165970",
                "110101200205162016",
                "110101200205162497",
                "11010120020516381X",
                "110101200205162198",
                "110101200205167116",
                "11010120020516103X",
                "110101200205162198",
                "110101200205169138",
                "110101200205169939",
                "110101200205169912",
                "11010120020516349X",
                "11010120020516269X",
                "11010120020516525X",
                "110101200205167255",
                "110101200205169859",
                "110101200205162710",
                "11010120020516947X",
                "110101200205164011",
                "110101200205167431",
                "110101200205166957",
                "110101200205167271",
                "110101200205165276",
                "11010120020516605X",
                "110101200205166893",
                "110101200205162112",
                "11010120020516605X",
                "110101200205163270",
                "110101200205162331",
                "110101200205166797",
                "11010120020516963X",
                "11010120020516103X",
                "110101200205162817",
                "110101200205164775",
                "11010120020516621X",
                "110101200205166076",
                "110101200205169293",
                "110101200205164652",
                "110101200205168696",
                "110101200205168899",
                "110101200205168274",
                "110101200205164652",
                "110101200205163158",
                "110101200205164337",
                "110101200205163799",
                "110101200205166893",
                "110101200205163254",
                "110101200205166770",
                "110101200205164134",
                "110101200205164679",
                "110101200205165970",
                "110101200205163713",
                "110101200205163377",
                "110101200205169357",
                "11010120020516293X",
                "110101200205168696",
                "110101200205166738",
                "110101200205166439",
                "110101200205166893"
            };

        [Test]
        public void Test()
        {
            IdCardAttribute s = new IdCardAttribute();
            foreach (var entry in Date)
            {
                var result = s.IsValid(entry);
                Assert.IsTrue(result, string.Format("错误的身份证号：{0}", entry));
            }
        }
    }
}